package org.s3.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.s3.project.entity.ShoppingCart;
import org.s3.project.entity.shopingzailaiyidan;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author cfx
 * @version 1.0
 * @Description
 * @date 2025/2/9 10:02
 */
@Service
public interface ShoppingCartService extends IService<ShoppingCart> {
    //修改购物车里面的数量
     Boolean  updateShoppingCart(@Param("number") Integer number, @Param("user_id") Integer user_id, @Param("id") Integer id);
     //批量删除购物车
    Boolean deleteShopings(@Param("ids") List<String> ids);
    //查询购物车里面是否有这件商品了
    int selectSole( Integer user_id ,Integer dish_id);
    //添加购物车  有这个商品直接修改他的数量+1
     Boolean  updateAddShoping(Integer user_id,  Integer dish_id);


    public String addlistShopingCart(List<ShoppingCart> shoppingCartList);


    public Boolean selectShoppingCart(long userId,long dishId);

    //修改
    public Boolean updateShoppingCart(List<shopingzailaiyidan> shoppingCartList);
}